<?php 
	include './header.php';
	$uid=$_SESSION['user']['id'];
	$model=new Model('user_info');
	$where['uid']=$uid;
	$res=$model->select($where)[0];
	//var_dump($res);
	//var_dump($_SESSION['user']);
		//var_dump($res['face']);
?>
<div class="clear"></div>
<div id="main">
	<div class="goods">
		<div class="person_left">
			<ul>
				<a href="<?php echo URL;?>/personal_info.php"><li><span style="line-height:100px;">个人信息</span></li></a>
				<a href="<?php echo URL;?>/personal_modify.php"><li><span  style="line-height:100px;">修改密码</span></li></a>
				<a href="<?php echo URL;?>/personal_order.php"><li><span  style="line-height:100px;">查看订单</span></li></a>
			</ul>
		</div>
		<div class="person_right">
			<a href="<?php echo URL?>/info_complete.php" style="color:#ED145B;margin:20px 20px;">完善信息</a>
			<table cellspacing="0" cellpadding="5" style="margin:20px 30px;box-shadow:0px 0px 20px #ED145B;text-align:center;font: 19px/32px 楷体;" width="400" height="400" >
				<tr>
					<td> 头像:</td>
					<td>
						<?php 
							echo $res['face']!='no.jpg'?'<img src="'.URL.'/public/uploads/'.substr($res['face'], 0,4).'/'.substr($res['face'], 4,2).'/'.substr($res['face'], 6,2).'/'.$res['face'].'">':'<img src="'.URL.'/public/images/no.jpg">';
						?>
					</td>
				</tr>
				<tr>
					<td> ID号:</td>
					<td><?php echo $res['id'];?></td>
				</tr>
				<tr>
					<td> 昵称:</td>
					<td><?php echo $res['name'];?></td>
				</tr>
				<tr>
					<td> 年龄:</td>
					<td><?php echo $res['age'];?></td>
				</tr>
				<tr>
					<td> 性别:</td>
					<td><input type="radio" name="sex" disabled <?php echo $res['sex']?'checked':'';?>>男
						<input type="radio" name="sex" disabled <?php echo $res['sex']?'':'checked';?>>女
					</td>
				</tr>
				<tr>
					<td> 生日:</td>
					<td><?php echo $res['birthday'];?></td>
				</tr>
				<tr>
					<td> Tel:</td>
					<td><?php echo $res['tel'];?></td>
				</tr>
				<tr>
					<td> QQ:</td>
					<td><?php echo $res['qq'];?></td>
				</tr>
				<tr>
					<td> E-mail:</td>
					<td><?php echo $res['email'];?></td>
				</tr>
				<tr>
					<td> 登录时间:</td>
					<td><?php echo date('Y年m月d日 H:i:s',$_SESSION['user']['logintime']);?></td>
				</tr>
			</table>

		</div>	
	</div>
</div>
<div class="clear"></div>
<?php 
	include PATH.'/footer.php';
?>